home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fatted Calf
/
The Fatted Calf.iso
/
Applications
/
DockExtenders
/
LaunchPad
/
Source
/
Time.m
< prev
next >
Wrap
Text File
|
1993-12-16
|
1KB
|
42 lines
/*
* Copyright 1991 RightBrain Software. All rights reserved.
*
* No part of this code may be reproduced in any form, compiled
* or source code, nor used for any purpose without the express
* written permission of RightBrain Software.
*
* Entered into the public domain 12/15/93 by RightBrain Software.
*
*/
/* This simple abstract class returns the integer time (standard UNIX */
/* "seconds-since-Jan 1, 1970") and can also return a string that is */
/* formatted according to the users NXDateAndTime default variable. */
/* Objects that use this are for the display of the time when the */
/* screen is locked, display of time in the Customize window (under */
/* the Standard Message popup menu) and by the subclass of */
/* application (SubApp) for the implementation of a trivial time */
/* bomb (during beta testing only.) */
#import <time.h>
#import <sys/time.h>
#import <appkit/Application.h>
#import <stdio.h>
#import "Time.h"
@implementation Time
- (int) currentIntTime
{
struct timeval tod;
//struct tm *theTime;
gettimeofday(&tod, (struct timezone *) 0);
return tod.tv_sec;
}
@end